www.gusucode.com > VC++ 实现标题栏背景颜色渐变效果-源码程序 > VC++ 实现标题栏背景颜色渐变效果-源码程序/code/GradientCapView.cpp

    // GradientCapView.cpp : implementation of the CGradientCapView class
// download by http://www.NewXing.com

#include "stdafx.h"
#include "GradientCap.h"

#include "GradientCapDoc.h"
#include "GradientCapView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CGradientCapView

IMPLEMENT_DYNCREATE(CGradientCapView, CView)

BEGIN_MESSAGE_MAP(CGradientCapView, CView)
	//{{AFX_MSG_MAP(CGradientCapView)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CGradientCapView construction/destruction

CGradientCapView::CGradientCapView()
{
	// TODO: add construction code here

}

CGradientCapView::~CGradientCapView()
{
}

BOOL CGradientCapView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CGradientCapView drawing

void CGradientCapView::OnDraw(CDC* pDC)
{
	CGradientCapDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
}

/////////////////////////////////////////////////////////////////////////////
// CGradientCapView diagnostics

#ifdef _DEBUG
void CGradientCapView::AssertValid() const
{
	CView::AssertValid();
}

void CGradientCapView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

CGradientCapDoc* CGradientCapView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CGradientCapDoc)));
	return (CGradientCapDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CGradientCapView message handlers